package main

import (
	"fmt"
	"github.com/gogf/gf/v2"
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/net/ghttp"
)

func main() {
	fmt.Println("Hello Word")
	fmt.Println("Hello GoFrame:", gf.VERSION)
	s := g.Server()
	s.BindHandler("/", func(r *ghttp.Request) {
		name := r.Get("name").String()
		bodyString := r.GetBodyString()
		json, err := r.GetJson()
		if err != nil {
		}
		fmt.Println(name, bodyString, json.Get("mmm"))
		fmt.Println(name, bodyString)
		println("name:", name)
		r.Response.Write("Hello World!")
	})
	s.SetPort(8000)
	s.Run()
}
